<!--
	khanguyenmail@gmail.com
-->
<?php

require_once ROOT_APPLICATION_MODULES_DEFAULT_MODELS . DS . "Articles.php";

//require models file

class CategoryController extends Zend_Controller_Action
{
    ///////////////////////
    // V A R I A B L E S //
    ///////////////////////
    
    /////////////////////
    // O V E R I D E S //
    /////////////////////    
    public function init()
    {
    	
    }
    
    ///////////////////
    // U T I L I E S //
    ///////////////////
	

    public function viewAction() { 
    	
    	// Get all article
    	$category_id = $this->_getParam('category_id');
    	$this->articleModel = new Application_Models_Articles();
    	$articles = $this->articleModel->filterByCategory($category_id);
        $this->view->articles = $articles; 
    	
	}

}